package com.sky.mapper;

import com.sky.anno.AutoFill;
import com.sky.dto.DishDTO;
import com.sky.entity.DishFlavor;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author with葡萄成熟时
 * @version 1.0
 */
@Mapper
public interface DishFlavorMapper {

    /**
     * @description: 增加菜品
     * @param: [flavors]
     * @return: void
     * @author Wait葡萄成熟时
     * @date: 下午11:24 2024/11/5
     */

    void addDish(List<DishFlavor> flavors);

    /**
     * @description: 用菜品id删除相对于口味
     * @param:
     * @return:
     * @author Wait葡萄成熟时
     * @date: 下午5:44 2024/11/7
     *
     */
    void deleteByDishId(List<Long> dishIds);

    /**
     * @description: 根据菜品id查询口味表
     * @param:
     * @return:
     * @author Wait葡萄成熟时
     * @date: 下午9:20 2024/11/7
     */
    @Select("select * from dish_flavor where dish_id=#{id}")
    List<DishFlavor> getDishFlavorByDishId(Long id);



}
